// 引入 request 文件
import request from '../utils/request';


// 登录接口
export const accountLogin = (params, httpConfig = {}) => {
  return request({
    url: 'api/user/accountLogin',
    method: 'POST',
    data: params
  }, httpConfig);
};

// 获取用户信息
export const wxLogin = (params, httpConfig = {}) => {
  return request({
    url: 'api/Wx/wxLogin',
    method: 'POST',
    data: params
  }, httpConfig);
};

// 获取用户信息
export const userInfo = (params, httpConfig = {}) => {
  return request({
    url: 'api/user/index',
    method: 'POST',
    data: params
  }, httpConfig);
};

// 获取用户信息
export const uploadAvatarUrl = (params, httpConfig = {}) => {
  return request({
    url: 'api/user/uploadAvatarUrl',
    method: 'POST',
    data: params
  }, httpConfig);
};




//购买过的商行
export const purchaseInfo = (params, httpConfig = {}) => {
  return request({
    url: 'api/user/purchaseInfo',
    method: 'POST',
    data: params
  }, httpConfig);
};



// 获取买家在商铺的账单总计
export const billByStoreId = (params, httpConfig = {}) => {
  return request({
    url: 'api/user/getBillByStoreId',
    method: 'POST',
    data: params
  }, httpConfig);
};

// 获取买家在店铺的账单详情
export const billDetailStoreId = (params, httpConfig = {}) => {
  return request({
    url: 'api/user/getBillDetailStoreId',
    method: 'POST',
    data: params
  }, httpConfig);
};

// 获取买家在店铺的账单详情
export const billDetailStoreIdExcel = (params, httpConfig = {}) => {
  return request({
    url: 'api/user/exportDetail',
    method: 'POST',
    data: params
  }, httpConfig);
};

// 根据订单ID获取订单详情
export const getOrderByOrderIdData = (params, httpConfig = {}) => {
  return request({
    url: 'api/order/getOrderByOrderIdData',
    method: 'POST',
    data: params
  }, httpConfig);
};


// 根据档口id获取店铺信息及下面用户信息
export const storeUserInfo = (params, httpConfig = {}) => {
  return request({
    url: 'api/user/getUserInfoByStoreId',
    method: 'POST',
    data: params
  }, httpConfig);
};

// 获取还款数据
export const getHuankuanData = (params, httpConfig = {}) => {
  return request({
    url: 'api/bill/getHuankuanData',
    method: 'POST',
    data: params
  }, httpConfig);
};
